//
// Created by xkj on 2020/8/22.
//

#ifndef PROJ_ANDROID_ONEWORDDETAIL_H
#define PROJ_ANDROID_ONEWORDDETAIL_H

#include <string>
#include <vector>

using namespace std;

class BishunDetail
{
public:
    int idx;
    std::vector<std::array<float,2>> linejoin;
    std::string name;

    BishunDetail(){
        idx = -1;
    }

    BishunDetail& operator=(const BishunDetail& oneBD)
    {
        // 避免自赋值
        if (this != &oneBD)
        {
            idx = oneBD.idx;
            linejoin = oneBD.linejoin;
            name = oneBD.name;
        }

        return *this;
    }
};

class Bishun{
public:
    std::string pinyin;
    int bihuaNum;
    int width;
    int height;
    std::vector<BishunDetail> bishun;

    Bishun(){
        bihuaNum = -1;
        width = -1;
        height = -1;
    }

    Bishun& operator=(const Bishun& oneB)
    {
        // 避免自赋值
        if (this != &oneB)
        {
            width = oneB.width;
            height = oneB.height;
            pinyin = oneB.pinyin;
            bishun = oneB.bishun;
            bihuaNum = oneB.bihuaNum;
        }

        return *this;
    }

};

class OneWordDetail{
public:
    OneWordDetail(){
        width = -1;
        height = -1;
    }

    OneWordDetail& operator=(const OneWordDetail& oneOWD)
    {
        // 避免自赋值
        if (this != &oneOWD)
        {
            width = oneOWD.width;
            height = oneOWD.height;
            drawcourse = oneOWD.drawcourse;
            pinyin = oneOWD.pinyin;
            bihua = oneOWD.bihua;
            bishun = oneOWD.bishun;
            bushou = oneOWD.bushou;
            duyin = oneOWD.duyin;
            fontSize = oneOWD.fontSize;
        }

        return *this;
    }

    int width;
    int height;
    std::vector<std::array<float,2>> drawcourse;
    std::string pinyin;
    std::vector<std::string> bihua;
    Bishun bishun;
    std::string bushou;
    std::string duyin;
    cocos2d::Size fontSize;
};

#endif //PROJ_ANDROID_ONEWORDDETAIL_H
